<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>测试页面</title>
</head>
<body>
<h1>测试页面</h1>
</body>
</html>
<script src="js/axios-0.18.0.min.js"></script>
<script>
    let url='http://127.0.0.1:8000/test3/'
    axios.get(url)
        .then(function (response) {
            console.log(response)
            alert(response.data.message)
        })
        .catch(function (error) {
             console.log(error)
             alert("状态码"+error.response.status)
        })

    axios.post(url)
        .then(function (response) {
            alert(response.data.message)
        })
        .catch(function (error) {
            alert("状态码"+error)
             alert("状态码"+error.response.status)
        })

</script>